<!DOCTYPE html>
<html>
<head>
    <title>${sysEn}-配件保养类别列表</title>
     <#include "/common/com_css.ftl" >
</head>
<body>
    <div id="wrapper">
        <!---右侧内容区开始---->
        <div class="gray-bg dashbard-1">

            <!-- 检索条件开始 -->
            <div class="ibox-content m-b-sm border-bottom">
                <div class="row">
                    <div class="col-sm-4">
                        <div class="form-group">
                            <label class="col-form-label" for="stTime">开始日期</label>
                            <input type="text" id="stTime" class="form-control m-b" placeholder="开始日期" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})">
                        </div>
                    </div>
                    <div class="col-sm-4">
                        <div class="form-group">
                            <label class="col-form-label" for="edTime">结束日期</label>
                            <input type="text" id="edTime" class="form-control m-b" placeholder="结束日期" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})">
                        </div>
                    </div>
                    <div class="col-sm-4">
                        <div class="form-group">
                            <label class="col-form-label" for="selPlatForm">平台</label>
                            <select class="form-control m-b" id="selPlatForm">
                                <option value="">请选择平台...</option>
                                <option value="PC端">PC端</option>
                                <option value="手机端">手机端</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="text-left">
                    <input type="button" name="" class="btn btn-primary" value="提交" id="btnSubmit"></input>
                </div>
            </div>
            <!-- 检索条件结束 -->
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox ">
                        <div class="ibox-content">
                            <div class="table-responsive">
                                <table class="table table-striped table-bordered table-hover" id="example" >
                                </table>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
        <!---右侧内容区结束---->
     </div>
    <#include "/common/com_table_js.ftl">
    <script type="text/javascript" src="/js/plugins/My97DatePicker/WdatePicker.js"></script>
    <script>
        $(document).ready(function() {

            var table =  ListPageManager.DataTable.init({
                ajax:{
                    url:"${ctx}/catagory_loglist_list.do"
                },
                ajaxParam:function(){
                    var obj = {};
                    var sublineNo = ListPageManager.Tools.urlParam(location.href,"sublineNo");
                    obj["sublineNo"] = sublineNo;
                    if($("#stTime").val()) {
                        obj["creatTimeSt"] = $("#stTime").val();
                    }
                    if($("#edTime").val()) {
                        obj["creatTimeEd"] = $("#edTime").val();
                    }
                    if($("#selPlatForm").val()){
                        obj["platform"] = $("#selPlatForm").val();
                    }
                    return obj;
                },
                columns:[
                    {title:"序号",data:"id"},
                    {title:"配件类别",data:"sublineName"},
                    {title:"平台",data:"platform"},
                    {title:"时间",render:function (data,type,row) {
                        return ListPageManager.Tools.formatDate(row["createTime"]);
                    }},
                    {title:"ip",data:"ip"}
                ]
            },$("#example"));
            $("#btnSubmit").on("click",function(){
                table.redraw();
            });
        });
    </script>
</body>
</html>
